package com.example.demo.mapper;

import com.example.demo.entity.CourseNum;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;
@Mapper
public interface CourseNumMapper {
    @Select("select * from coursenum")
    List<CourseNum> selectAllCourseNum();

    @Select("select * from coursenum where id=#{id}")
    List<CourseNum> selectCourseNumById(int id);

    @Select("select * from coursenum where createtime=#{createtime} and id=#{id}")
   CourseNum selectCourseNumByCreateTimeAndId(Date createtime,int id);

    @Select("select * from coursenum where id=#{id} and term=#{term}")
    CourseNum selectCourseNumByIdAndTerm(int id,String term);
}
